package com.itheima2.work4;

import java.lang.reflect.Array;
import java.util.Arrays;

public class PaiXu {


    public static void main(String[] args) {
        String str = "44 99 55 111 88 22 11 77 33 66";

        int[] arr =paixu(str);
        System.out.println(Arrays.toString(arr));



    }

    public static int[] paixu(String str) {
        String[] arr = str.split(" ");
               int[] arr1 = new int[arr.length];
        for (int i = 0; i < arr1.length; i++) {

                arr1[i] = Integer.parseInt(arr[i]);
        }
        for (int i = 0; i < arr1.length - 1; i++) {
            for (int j = 0; j < arr1.length-i-1; j++) {
                if(arr1[j]>arr1[j+1]){
                    int temp = arr1[j];
                    arr1[j] = arr1[j+1];
                    arr1[j+1] = temp;
                }
            }
        }
        return arr1;
    }

}

